package com.zhuhjay.service.imchat.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhuhjay.common.web.model.domain.CursorReq;
import com.zhuhjay.common.web.model.domain.CursorResp;
import com.zhuhjay.service.imchat.model.dto.ChatMessageDto;
import com.zhuhjay.service.imchat.model.entity.ChatMessage;
import com.zhuhjay.service.imchat.model.vo.ChatMessageVo;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author ZhuHJay
 * @since 2023-07-11
 */
public interface ChatMessageService extends IService<ChatMessage> {

    /**
     * 获取聊天消息列表, 通过游标分页
     *
     * @param cursorReq 游标请求
     * @return 游标响应
     */
    CursorResp<ChatMessageVo> cursor(CursorReq cursorReq);

    /**
     * 发送消息
     *
     * @param dto 消息
     * @param eventName 事件名称
     */
    void sendMessage(ChatMessageDto dto, String eventName);
}
